﻿
Imports std

Public Class result_initialize_slice_wrapper
    Inherits slice_wrapper

    Public Sub New(ByVal s As islice)
        MyBase.New(s)
    End Sub

    Public Overrides Function capacity(ByVal result As pointer(Of Int64)) As eventComb
        assert(eva(result, npos))
        Return MyBase.capacity(result)
    End Function

    Public Overrides Function delete(ByVal key As String, ByVal result As pointer(Of Boolean)) As eventComb
        assert(eva(result, False))
        Return MyBase.delete(key, result)
    End Function

    Public Overrides Function empty(ByVal result As pointer(Of Boolean)) As eventComb
        assert(eva(result, True))
        Return MyBase.empty(result)
    End Function

    Public Overrides Function full(ByVal result As pointer(Of Boolean)) As eventComb
        assert(eva(result, False))
        Return MyBase.full(result)
    End Function

    Public Overrides Function heartbeat(ByVal result As pointer(Of Boolean)) As eventComb
        assert(eva(result, False))
        Return MyBase.heartbeat(result)
    End Function

    Public Overrides Function keycount(ByVal result As pointer(Of Int64)) As eventComb
        assert(eva(result, npos))
        Return MyBase.keycount(result)
    End Function

    Public Overrides Function list(ByVal result As pointer(Of vector(Of String))) As eventComb
        assert(eva(result, [default](Of vector(Of String))()))
        Return MyBase.list(result)
    End Function

    Public Overrides Function modify(ByVal key As String,
                                     ByVal buff As bytes,
                                     ByVal ts As Int64,
                                     ByVal result As pointer(Of Boolean)) As eventComb
        assert(eva(result, False))
        Return MyBase.modify(key, buff, ts, result)
    End Function

    Public Overrides Function read(ByVal key As String,
                                   ByVal result As pointer(Of bytes),
                                   ByVal ts As pointer(Of Int64)) As eventComb
        assert(eva(result, [default](Of bytes)()))
        assert(eva(ts, npos))
        Return MyBase.read(key, result, ts)
    End Function

    Public Overrides Function retire(ByVal result As pointer(Of Boolean)) As eventComb
        assert(eva(result, False))
        Return MyBase.retire(result)
    End Function

    Public Overrides Function seek(ByVal key As String, ByVal result As pointer(Of Boolean)) As eventComb
        assert(eva(result, False))
        Return MyBase.seek(key, result)
    End Function

    Public Overrides Function sizeof(ByVal key As String, ByVal result As pointer(Of Int64)) As eventComb
        assert(eva(result, npos))
        Return MyBase.sizeof(key, result)
    End Function

    Public Overrides Function uniqueWrite(ByVal key As String,
                                          ByVal buff As bytes,
                                          ByVal ts As Int64,
                                          ByVal result As pointer(Of Boolean)) As eventComb
        assert(eva(result, False))
        Return MyBase.uniqueWrite(key, buff, ts, result)
    End Function

    Public Overrides Function valuesize(ByVal result As pointer(Of Int64)) As eventComb
        assert(eva(result, npos))
        Return MyBase.valuesize(result)
    End Function

    Public Overrides Function write(ByVal key As String,
                                    ByVal buff As bytes,
                                    ByVal ts As Int64,
                                    ByVal result As pointer(Of Boolean)) As eventComb
        assert(eva(result, False))
        Return MyBase.write(key, buff, ts, result)
    End Function
End Class
